package com.crm.model.mdao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.crm.model.mpojo.Gatherguests;
import com.crm.model.mpojo.Internatwaters;

/**
 * 获客mybatisDAO
 * @author Menghui
 *
 */
@Mapper
public interface GatherguestsMapper {
    int deleteByPrimaryKey(Integer gaId);

    int insert(Gatherguests record);

    int insertSelective(Gatherguests record);

    //@Param("gaId") 
    Gatherguests selectByPrimaryKey(@Param("gaId") Integer gaId);

    int updateByPrimaryKeySelective(Gatherguests record);

    int updateByPrimaryKey(Gatherguests record);
    
    //获取当天获客数
    int selectgetcustNum();
    //查询全部获客信息
    List<Map<String, String>> selectAllGather();
    
    //将公海转为普通
    public int updateCust(@Param("gatherId") Integer gatherId);
    
    //查询单个集客信息
    Gatherguests selectByGaid(@Param("gatherId") Integer gatherId);
    
    //修改公海数据[所有者，更新时间]
    int updateGather(@Param("gatherId") Integer gatherId,
    		@Param("uId") Integer uId,
    		@Param("gaUpdate") Date gaUpdate);
    
    //根据所有者查询
	List<Map<String, String>> selectByuName(@Param("uname") String uname);
	
    }

	